"use strict";
var __extends = (this && this.__extends) || function (d, b) {
    for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
    function __() { this.constructor = d; }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var React = require("react");
var $ = require('jquery');
var __1 = require('../../工具代码/颜色');
var _____1 = require('../展示组件/宽度占位符');
var R菜单 = (function (_super) {
    __extends(R菜单, _super);
    function R菜单(props) {
        _super.call(this, props);
        this.前景色 = new __1.default(0, 160, 0);
        this.样式 = {
            position: 'absolute',
            left: '72',
            top: '73',
            width: '80px',
            padding: '1px',
            backgroundColor: __1.default.乘(this.前景色, 255).取值,
            boxShadow: '0 0 10px ' + __1.default.rgb(120, 120, 120).取值,
            border: 'solid 1px ' + __1.default.rgb(150, 150, 150).取值,
            color: __1.default.rgb(90, 90, 90).取值,
            WebkitAppRegion: 'no-drag',
            borderRadius: '0 5px 5px',
            zIndex: 11000
        };
        this.模态框样式 = {
            position: 'absolute',
            left: '0px',
            top: '0px',
            width: '100%',
            height: '100%',
            zIndex: 10100,
            WebkitAppRegion: 'no-drag'
        };
        this.state = {
            正常样式: this.样式,
        };
    }
    R菜单.prototype.render = function () {
        var _this = this;
        return (React.createElement("div", null, React.createElement("div", {style: this.模态框样式, onMouseDown: function (e) {
            _this.props.隐藏菜单();
        }}), React.createElement("div", {style: this.state.正常样式 ? this.state.正常样式 : this.样式, onClick: function (e) {
            e.stopPropagation();
            _this.props.隐藏菜单();
        }}, this.props.菜单数据.map(function (数据, 计数) {
            return React.createElement(R菜单项, React.__spread({}, 数据, {key: 计数}));
        }))));
    };
    return R菜单;
}(React.Component));
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = R菜单;
var R菜单项 = (function (_super) {
    __extends(R菜单项, _super);
    function R菜单项(props) {
        _super.call(this, props);
        this.前景色 = new __1.default(255, 255, 0);
        this.样式 = {
            backgroundColor: __1.default.乘(this.前景色, 255).取值,
            width: '100%',
            lineHeight: '24px',
        };
        this.经过样式 = {
            backgroundColor: __1.default.乘(this.前景色, 195).取值,
            color: __1.default.rgb(30, 30, 30).取值,
        };
        this.按下样式 = {
            backgroundColor: __1.default.乘(this.前景色, 175).取值,
            lineHeight: '26px',
            color: __1.default.rgb(0, 0, 0).取值,
        };
        this.图标样式 = {
            fontSize: '14px',
            lineHeight: '24px',
            color: new __1.default(255, 130, 0).取值
        };
        this.state = { 正常样式: this.样式 };
    }
    R菜单项.prototype.render = function () {
        var _this = this;
        return (React.createElement("div", {className: this.props.菜单项类名, style: this.state.正常样式 ? this.state.正常样式 : this.样式, onMouseMove: function (e) {
            e.stopPropagation();
            _this.setState({ 正常样式: $.extend({}, _this.样式, _this.经过样式) });
        }, onMouseOut: function (e) {
            e.stopPropagation();
            _this.setState({ 正常样式: _this.样式 });
        }, onMouseDown: function () {
            _this.setState({ 正常样式: $.extend({}, _this.样式, _this.按下样式) });
        }, onMouseUp: function () {
            _this.setState({ 正常样式: _this.样式 });
        }}, React.createElement("i", {style: this.图标样式, className: "iconfont " + this.props.图标样式}), React.createElement(_____1.default, {"宽度": '10px'}), React.createElement("span", null, this.props.菜单名称)));
    };
    return R菜单项;
}(React.Component));
